from langchain_community.llms import Tongyi
from langchain.prompts import PromptTemplate
from dotenv import load_dotenv, find_dotenv

load_dotenv(find_dotenv())

template = """
    给我一个很土但是听起来好养活的{对象}起个小名
    """
prompt = PromptTemplate.from_template(template)
llm = Tongyi()

chain = prompt | llm
print(chain.invoke("小狗"))
print(chain.invoke("小女孩"))